<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>

</head>

<body>

    <form action="#" id="myForm">
        <div>
            用户名<input type="text" onblur="onblurByUsername(this)">

        </div>
        <div>
            密码<input type="text">

        </div>
        <div>
            性别<select name="sex" id="sex">
                <option value="男">男</option>
                <option value="女">女</option>
            </select>

        </div>
        <div>
            学历<select name="education" id="education">
                <option value="本科">本科</option>
                <option value="专科">专科</option>
            </select>

        </div>
        <div>
            自我介绍<textarea name="introduction" id = "introduction" cols="20" rows="4"></textarea>
        </div>
        <button type="button" onclick="mySubmit(this)">提交</button>
        <button type="reset">重置</button>
    </form>
</body>
<script >
    function mySubmit(thisElement){
        alert(document.getElementById("introduction").value);
        document.getElementById("introduction").value
    } 
    function onblurByUsername(thisElement){
        if(thisElement.value != "admin"){
            alert("用户名输入有误，重新输入");
        }
    }
</script>
</html>